import 'dart:convert';
// https://app.quicktype.io/
// JSON To Dart网址
class ApiResponse {
    final dynamic data;
    final int code;
    final String message;

    ApiResponse({
        required this.data,
        required this.code,
        required this.message,
    });

    factory ApiResponse.fromRawJson(String str) => ApiResponse.fromJson(json.decode(str));

    String toRawJson() => json.encode(toJson());

    factory ApiResponse.fromJson(Map<String, dynamic> json) => ApiResponse(
        data: json["data"],
        code: json["code"],
        message: json["message"],
    );

    Map<String, dynamic> toJson() => {
        "data": data,
        "code": code,
        "message": message,
    };
}
